<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/FrameXML\UI.xsd">
	<Frame name="MyPositionFrame" movable="true" frameStrata="MEDIUM" toplevel="true" parent="UIParent">
		<Size>
			<AbsDimension x="50" y="9"/>
		</Size>
		<Anchors>
			<Anchor point="CENTER"/>
		</Anchors>
		<Layers>
			<Layer level="OVERLAY">
				<FontString name="$parentText" inherits="GameFontNormalSmall" justifyH="CENTER">
					<Size>
						<AbsDimension x="75" y="9"/>
					</Size>
					<Anchors>
						<Anchor point="CENTER">
							<Offset>
								<AbsDimension x="0" y="1"/>
							</Offset>
						</Anchor>
					</Anchors>
				</FontString>
			</Layer>
		</Layers>
		<Scripts>
			<OnMouseDown>
				if (button == "LeftButton") and IsAltKeyDown() then
					self.moving = 1
					self:StartMoving()
				end
			</OnMouseDown>
			<OnMouseUp>
				if self.moving then
					self.moving = nil
					self:StopMovingOrSizing()
				end
			</OnMouseUp>
			<OnLoad>
				self:RegisterEvent("MINIMAP_ZONE_CHANGED")
				self:RegisterEvent("ZONE_CHANGED")
				self:RegisterEvent("ZONE_CHANGED_INDOORS")
				self:RegisterEvent("ZONE_CHANGED_NEW_AREA")
				self.elapsed = 0
			</OnLoad>
			<OnUpdate>
				self.elapsed = self.elapsed + elapsed
				if (self.elapsed > 1) then
					self.elapsed = 0
					if not WorldMapFrame:IsVisible() then
						local x,y = GetPlayerMapPosition("player")
						if (x == 0) and (y == 0) and not IsInInstance() then
							SetMapToCurrentZone()
							x,y = GetPlayerMapPosition("player")
						end
						MyPositionFrameText:SetText(format("(%.0f,%.0f)", 100*x, 100*y))
					end
				end
			</OnUpdate>
			<OnEvent>
				if not WorldMapFrame:IsVisible() then
					SetMapToCurrentZone()
				end
			</OnEvent>
		</Scripts>
	</Frame>
</Ui>

